home *** CD-ROM | disk | FTP | other *** search
/ Gekikoh Dennoh Club 2 / Gekikoh Dennoh Club Vol. 2 (Japan).7z / Gekikoh Dennoh Club Vol. 2 (Japan) (Track 01).bin / games / mashou / plugin / zmmask.c < prev   
Text File  |  1997-10-07  |  927b  |  51 lines

  1. /*
  2.                                 
  3.         ZMUSIC V2の演奏トラックをマスク
  4.     ZMmute.x [maskch1 maskch2 .....maskch10]
  5.     maskch1:==0 all track play
  6.         !=0 mask
  7.     maskch2~10 mask channel (省略可)
  8.     全省略時全トラック演奏
  9.     return:        0:no error
  10.             1:command error
  11.             2:no inserted ZMUSIC
  12.                                 
  13.                 by SJOM
  14. */
  15.  
  16.  
  17. #include <stdlib.h>
  18. #include <ZMUSIC.h>
  19. #include <stdio.h>        /* test */
  20.  
  21. static int *maskch;
  22.  
  23. int
  24. main(int argc,char **argv)
  25. {
  26.     int opt=0,*ch_no,i=0;
  27.     if ((zm_ver() & 0xffff)==0)
  28.         exit(2);
  29.     if (argc==1) {
  30.         m_mute(0,0,0,0,0,0,0,0,0,0);
  31.         exit(0);
  32.     }
  33.     if ((opt=argc-1)>10)
  34.         exit(1);
  35.     if ((maskch=malloc(11*sizeof(int)))==0)
  36.         exit(1);
  37.     ch_no=maskch;
  38.     argv++;
  39.     for (i=0;i<opt;i++) {
  40.         if ((*ch_no=atoi(*argv) & 63)>32)
  41.             exit(1);
  42.         argv++;
  43.         ch_no++;
  44.     };
  45.     *ch_no=0;
  46.     m_mute(maskch[0],maskch[1],maskch[2],maskch[3],maskch[4],
  47.     maskch[5],maskch[6],maskch[7],maskch[8],maskch[9]);
  48.     exit(0);
  49. }
  50.  
  51.